var dom = document.getElementById("main");
var myChart = echarts.init(dom);
option = {
    
    tooltip: {
        trigger: 'axis',
    },
    legend: {
        left: 'right',
        data: ['支出', '收入']
    },
    xAxis: {
        type: 'category',
        name: 'x',
        splitLine: {show: false},
        data: ['一', '二', '三', '四', '五', '六', '七', '八']
    },
    grid: {
        top:'13%',
        left: '3%',
        right: '4%',
        bottom: '0%',
        containLabel: true
    },
    yAxis: {
        type: 'log',
        name: 'y'
    },
    series: [
        {
            name: '支出',
            type: 'line',
            data: [2662.01, 996.26, 926.65, 2961.00, 1863.20, 4740.51, 3535.15, 2223]
        },
        {
            name: '收入',
            type: 'line',
            data: [1999.06, 186.92, 17.42, 3337.51, 142.66, 221.81, 1817.04, 128]
        },
    ]
};

myChart.setOption(option, true);